<?php

namespace common\entities\myhtsq;

use common\entities\ContractEntity;
use Yii;

/**
 * This is the model class for table "myscrm_invoice_business_unit".
 *
 * @property string $BUGUID
 * @property string $BUCode
 * @property string $BUName
 * @property string $BUFullName
 * @property string $created_on
 * @property string $created_by
 * @property string $modified_on
 * @property string $modified_by
 * @property string $erp_guid
 */
class InvoiceBusinessUnitEntity extends ContractEntity
{

    /**
     * @inheritdoc
     */
    public static function tableName() {
        return 'myscrm_invoice_business_unit';
    }

    /**
     * @inheritdoc
     */
    public function rules() {
        return [
            [['BUGUID'], 'required'],
            [['BUName', 'BUCode'], 'string', 'max' => 50],
            [['BUFullName'], 'string', 'max' => 100],
            [['created_on', 'modified_on'], 'safe'],
            [['BUGUID', 'created_by', 'modified_by', 'erp_guid'], 'string', 'max' => 36]
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels() {
        return [
            'BUGUID' => '开票单位id',
            'BUCode' => '单位编号',
            'BUName' => '单位名称',
            'BUFullName' => '单位全称',
            'created_on' => '创建时间',
            'created_by' => '创建人',
            'modified_on' => '修改时间',
            'modified_by' => '修改人',
            'erp_guid' => '对应的ERP的开票单位GUID'
        ];
    }

}
